import StorageKey from "../../util/StorageKey";

interface IMyCenter {
    jwt?: string
    statusBarHeight: number
}

var globalData = getApp().globalData
Page({
    data: {
        jwt: undefined,
        statusBarHeight: globalData.statusBarHeight
    } as IMyCenter,
    onLoad() {
        this.getJwt()
    },
    onShow() {
        this.getTabBar().init()
        this.getJwt()
    },
    getJwt() {
        const jwt = wx.getStorageSync(StorageKey.JWT) || ''
        this.setData({ jwt })
    },
    goLoginClick() {
        wx.navigateTo({ url: '/pages/login/login' })
    }
})